import 'package:flutter/material.dart';
import 'package:my_desk_flutter/page/home_page.dart';
import 'package:my_desk_flutter/page/login_page.dart';

typedef RouterBuilder = Route Function(dynamic arguments);

class AppRouter {
  static Map<String, RouterBuilder> router = {
    '/login': (arguments) => MaterialPageRoute(
          settings: RouteSettings(arguments: arguments),
          builder: (BuildContext context) {
            return const LoginPage();
          },
        ),
    '/': (arguments) => MaterialPageRoute(
          settings: RouteSettings(arguments: arguments),
          builder: (BuildContext context) {
            return const HomePage();
          },
        ),
  };
}
